﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcApplication5.Models;
using MvcApplication5.DAM;
using System.Data;
using MyFrameWork.Dam;
using MyFrameWork.Common;
using MvcApplication5.Common;

namespace MvcApplication5.Controllers
{
    public class DefaultController : MyController
    {
        //
        // GET: /Common/

        public ActionResult Index()
        {
            ServiceReference.WeatherWebServiceSoapClient weather = new ServiceReference.WeatherWebServiceSoapClient("WeatherWebServiceSoap");
            string[] cityWeather = weather.getWeatherbyCityName("上海");
            ViewData["CityWeather"] = cityWeather[1] + cityWeather[6] + "温度 " + cityWeather[5];
            if (ViewData["CityWeather"] == "免费用户不能使用高速访问。联系我们：http://www.webxml.com.cn/温度 ")
            {
                ViewData["CityWeather"] = string.Empty;
            }
            return View();
        }
    }
}
